home *** CD-ROM | disk | FTP | other *** search
/ Symantec Visual Cafe for Java 2.5 / symantec-visual-cafe-2.5-database-dev-edition.iso / Visual Cafe Pro v1.0 / TUTORIAL.BIN / DbaDataLink.class (.txt) < prev    next >
Encoding:
Java Class File  |  1997-01-30  |  1.3 KB  |  46 lines

  1. package symantec.itools.db.awt;
  2.  
  3. import symantec.itools.db.pro.Record;
  4. import symantec.itools.db.pro.RecordLink;
  5. import symantec.itools.db.pro.RelationView;
  6. import symjava.sql.SQLException;
  7.  
  8. class DbaDataLink implements RecordLink {
  9.    DbaDataStore store;
  10.    int recordNumber;
  11.    // $FF: renamed from: rv symantec.itools.db.pro.RelationView
  12.    RelationView field_0;
  13.  
  14.    public DbaDataLink(DbaDataStore s) {
  15.       this.store = s;
  16.    }
  17.  
  18.    public void init() {
  19.       this.recordNumber = -1;
  20.    }
  21.  
  22.    public void notifyRecordChange(Record currentRec) throws SQLException {
  23.       if (currentRec != null) {
  24.          switch (currentRec.getState()) {
  25.             case 100:
  26.             case 101:
  27.             case 102:
  28.             case 103:
  29.             case 104:
  30.             case 106:
  31.                if (this.field_0 == null) {
  32.                   this.field_0 = currentRec.getRelationView();
  33.                }
  34.  
  35.                if (this.field_0 != null && this.field_0.getCurrentRecordNumber() != this.recordNumber) {
  36.                   this.recordNumber = this.field_0.getCurrentRecordNumber();
  37.                   this.store.changeInMaster();
  38.                   return;
  39.                }
  40.             case 105:
  41.          }
  42.       }
  43.  
  44.    }
  45. }
  46.